package com.itheima.sfbx.task.job;

import com.itheima.sfbx.file.feign.FileBusinessFeign;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class HelloHandlerJob {
    @Autowired
    FileBusinessFeign fileBusinessFeign;

    @XxlJob(value = "Hello-world")
    public ReturnT<String> execute(String param) {
        for (int i = 0; i < 10; i++) {
            log.warn("计划任务开始执行...Hello-world");
        }
        ReturnT.SUCCESS.setMsg("计划任务：-成功");
        return ReturnT.SUCCESS;

    }
}
